package cn.edu.neu.service.impl;

import cn.edu.neu.dao.ReportedDao;
import cn.edu.neu.model.Reported;
import cn.edu.neu.service.ReportedService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ReportedServiceImpl implements ReportedService {
    @Autowired
    private ReportedDao reportedDao;
    @Override
    public int insertReported(Reported reported) {
        return reportedDao.insert(reported);
    }

    @Override
    public List<Reported> getReportedList() {
        return reportedDao.getReportedList();
    }

    @Override
    public Reported getReportedById(Integer id) {
        return reportedDao.selectByPrimaryKey(id);
    }

    @Override
    public int updateStatusYes(Integer id) {
        return reportedDao.updateStatusYes(id);
    }

    @Override
    public int updateStatusNo(Integer id) {
        return reportedDao.updateStatusNo(id);
    }
}
